#ifndef _WX_APPTRAIT_H_
#define _WX_APPTRAIT_H_

#include "wx/string.h"
#include "wx/platinfo.h"

class wxObject;
class wxAppTraits;
class wxFontMapper;
class wxLog;
class wxMessageOutput;
class wxRendererNative;
class wxString;
class GSocketGUIFunctionsTable;

class wxStandardPathsBase;

class wxAppTraitsBase {
  public:
    virtual ~wxAppTraitsBase() { }
    virtual wxLog *CreateLogTarget() = 0;
    virtual wxMessageOutput *CreateMessageOutput() = 0;
    virtual wxFontMapper *CreateFontMapper() = 0;
    virtual wxRendererNative *CreateRenderer() = 0;
    virtual wxStandardPathsBase& GetStandardPaths();
    virtual void ScheduleForDestroy( wxObject *object ) = 0;
    virtual void RemoveFromPendingDelete( wxObject *object ) = 0;
    virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
    virtual wxPortId GetToolkitVersion( int *majVer, int *minVer ) const = 0;
    virtual bool IsUsingUniversalWidgets() const = 0;
    virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
  protected:
    #if defined( __WXDEBUG__ )
    virtual wxString GetAssertStackTrace();
    #endif
};

#include "wx/unix/apptbase.h"

class wxConsoleAppTraitsBase : public wxAppTraits {
  public:
    virtual wxLog *CreateLogTarget();
    virtual wxMessageOutput *CreateMessageOutput();
    virtual wxFontMapper *CreateFontMapper();
    virtual wxRendererNative *CreateRenderer();
    #if wxUSE_SOCKETS
    virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
    #endif

    virtual void ScheduleForDestroy( wxObject *object );
    virtual void RemoveFromPendingDelete( wxObject *object );
    virtual wxPortId GetToolkitVersion( int *verMaj, int *verMin ) const {
      return wxPORT_BASE;
    }

    virtual bool IsUsingUniversalWidgets() const { return false; }
};

class wxGUIAppTraitsBase : public wxAppTraits {
  public:
    virtual wxLog *CreateLogTarget();
    virtual wxMessageOutput *CreateMessageOutput();
    virtual wxFontMapper *CreateFontMapper();
    virtual wxRendererNative *CreateRenderer();
    #if wxUSE_SOCKETS
    virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
    #endif

    virtual void ScheduleForDestroy( wxObject *object );
    virtual void RemoveFromPendingDelete( wxObject *object );

    virtual bool IsUsingUniversalWidgets() const {
      #ifdef __WXUNIVERSAL__
      return true;
      #else
      return false;
      #endif
    }
};

#include "wx/unix/apptrait.h"

#if defined(__WXPALMOS__)
#elif defined(__WIN32__)
#elif defined(__OS2__)
#elif defined(__UNIX__)
//  #error mmmm

#elif defined(__WXMAC__)
#elif defined(__DOS__)
#else
  #error mmmm
class wxGUIAppTraits : public wxGUIAppTraitsBase {
};
class wxConsoleAppTraits: public wxConsoleAppTraitsBase {
};
#endif // platform

#endif // _WX_APPTRAIT_H_

